GetMediaSampleDescriptionCount
TheGetMediaSampleDescriptionCount
function returns the number of sample descriptions in a media.
pascal long GetMediaSampleDescriptionCount (Media theMedia);
theMedia
- Specifies the media for this operation. You obtain this media identifier from such Movie Toolbox functions as
NewTrackMedia
andGetTrackMedia
(described on page 2-138 and page 2-190, respectively).DESCRIPTION
The Movie Toolbox identifies a media's sample descriptions with an index value.
Index values always range from 1 to the number of sample descriptions in the
media. Sample description indexes provide a convenient way to access each sample description in a media.The format of sample descriptions differs by media type. Sample descriptions for image data are defined by image description structures, which are discussed in the chapter "Image Compression Manager" in this book. Sample descriptions for sound are defined by sound description structures, which are discussed in "The Sound Description Structure" beginning on page 2-68. Sample descriptions for text are defined by text description structures, which are described in "Text Media Handler Functions" beginning on page 2-272.
ERROR CODES
invalidMedia -2008 This media is corrupted or invalid SEE ALSO
You can use the value returned by this function to control a loop in which you retrieve each sample description in a media by calling theGetMediaSampleDescription
function, which is described in the next section.